Skip to content

Commit 0c3564b

Browse files
committed
Further sync
1 parent f5e1644 commit 0c3564b

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

custom_components/file_plusplus/config_flow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ async def _async_handle_step(
105105
if not await self.validate_file_path(user_input[CONF_FILE_PATH]):
106106
errors[CONF_FILE_PATH] = "not_allowed"
107107
else:
108-
title = f"{DEFAULT_NAME} [{user_input[CONF_FILE_PATH]}]"
108+
# title = f"{DEFAULT_NAME} [{user_input[CONF_FILE_PATH]}]"
109+
title = f"{platform.capitalize()} [{user_input[CONF_FILE_PATH]}]"
109110
data = deepcopy(user_input)
110111
options = {}
111112
for key, value in user_input.items():

custom_components/file_plusplus/sensor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import logging
66
import os
77

8-
from file_read_backwards import FileReadBackwards
9-
108
from homeassistant.components.sensor import SensorEntity
119
from homeassistant.config_entries import ConfigEntry
1210
from homeassistant.const import (

custom_components/file_plusplus/translations/en.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"data_description": {
2121
"file_path": "The local file path to retrieve the sensor value from",
22-
"value_template": "A template to render the the sensors value based on the file content",
22+
"value_template": "A template to render the sensors value based on the file content",
2323
"unit_of_measurement": "Unit of measurement for the sensor"
2424
}
2525
},
@@ -43,6 +43,22 @@
4343
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
4444
}
4545
},
46+
"options": {
47+
"step": {
48+
"init": {
49+
"data": {
50+
"value_template": "[%key:component::file::config::step::sensor::data::value_template%]",
51+
"unit_of_measurement": "[%key:component::file::config::step::sensor::data::unit_of_measurement%]",
52+
"timestamp": "[%key:component::file::config::step::notify::data::timestamp%]"
53+
},
54+
"data_description": {
55+
"value_template": "[%key:component::file::config::step::sensor::data_description::value_template%]",
56+
"unit_of_measurement": "[%key:component::file::config::step::sensor::data_description::unit_of_measurement%]",
57+
"timestamp": "[%key:component::file::config::step::notify::data_description::timestamp%]"
58+
}
59+
}
60+
}
61+
},
4662
"exceptions": {
4763
"dir_not_allowed": {
4864
"message": "Access to {filename} is not allowed."
@@ -51,4 +67,4 @@
5167
"message": "Write access to {filename} failed: {exc}."
5268
}
5369
}
54-
}
70+
}

0 commit comments

Comments
 (0)