Skip to content

Commit

Permalink
refactoring complet
Browse files Browse the repository at this point in the history
suppression configuration via YAML
  • Loading branch information
saniho committed May 11, 2021
1 parent bbf40d5 commit 754f2c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion custom_components/apiEnedis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ def update_OptionsMyEnedis(self):
hpcost = float(self.entry.options.get(HP_COST, "0.0"))
token, code = self.entry.options[CONF_TOKEN], self.entry.options[CONF_CODE]
heurescreusesON = self.entry.options[HEURESCREUSES_ON]
heurescreuses = eval(self.entry.options.get(HEURES_CREUSES, "[]"))
heurescreusesch = self.entry.options.get(HEURES_CREUSES, "[]")
if ( heurescreusesch == "" ):
heurescreusesch = "[]"
heurescreuses = eval(heurescreusesch)
_LOGGER.info("options - proc -- %s %s %s %s %s %s" % (token, code, hccost, hpcost, heurescreusesON, heurescreuses))

self.clientEnedis = myClientEnedis.myClientEnedis(token, code, delai=DEFAULT_REPRISE_ERR,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/apiEnedis/const.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
""" Constants """

__VERSION__ = "1.2.0.0rc3" # attention updater aussi manifest.json
__VERSION__ = "1.2.0.0rc4" # attention updater aussi manifest.json
__name__ = "myEnedis"

try:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/apiEnedis/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "myEnedis sensor",
"documentation": "https://github.com/saniho/apiEnedis/",
"config_flow": true,
"version": "1.2.0.0rc3",
"version": "1.2.0.0rc4",
"requirements": [
],
"dependencies": [],
Expand Down

0 comments on commit 754f2c1

Please sign in to comment.