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 d2f32ec commit bbf40d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions custom_components/apiEnedis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async def async_set_options(self):
HP_COST: str(data.pop(HP_COST, "0.0")),
HC_COST: str(data.pop(HC_COST, "0.0")),
HEURESCREUSES_ON: bool(data.pop(HEURESCREUSES_ON, True)),
HEURES_CREUSES: str(data.pop(HEURES_CREUSES, "")),
HEURES_CREUSES: str(data.pop(HEURES_CREUSES, "[]")),
}
self.hass.config_entries.async_update_entry(
self.entry, data=data, options=options
Expand All @@ -217,7 +217,7 @@ 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, ""))
heurescreuses = eval(self.entry.options.get(HEURES_CREUSES, "[]"))
_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.0rc2" # attention updater aussi manifest.json
__VERSION__ = "1.2.0.0rc3" # 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.0rc2",
"version": "1.2.0.0rc3",
"requirements": [
],
"dependencies": [],
Expand Down

0 comments on commit bbf40d5

Please sign in to comment.